安装JupyterLab失败的解决方案 您所在的位置:网站首页 jupyterlab server connection error 安装JupyterLab失败的解决方案

安装JupyterLab失败的解决方案

#安装JupyterLab失败的解决方案| 来源: 网络整理| 查看: 265

由于本人电脑安装的Python版本==3.6比较低,所以可能存在下面两种方法都安装失败,最后给出一个简单省事的方法。

Jupyter lab比Jupyter Notebook要好用,试了之后感觉跟VSCode一样的存在,所以还是值得安装来代替Jupyter Notebook使用。

安装的方法比较多,一般常用的就是conda和pip

>conda install -c conda-forge jupyterlab ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'conda-forge::charset-normalizer-2.1.1-pyhd8ed1ab_0'. CondaError: Cannot link a source that does not exist. D:\Anaconda3\Scripts\conda.exe Running `conda clean --packages` may resolve your problem. Attempting to roll back. CondaError: Cannot link a source that does not exist. D:\Anaconda3\Scripts\conda.exe Running `conda clean --packages` may resolve your problem.

错误显示安装 'conda-forge::charset-normalizer-2.1.1-pyhd8ed1ab_0'这个包的时候出现连接错误,然后报错的涉及到了conda.exe本身,它的建议是运行“conda clean --packages”对包进行清理

>conda clean --packages

操作之后进行安装,错误依然存在

>conda clean --all --yes

操作之后进行安装,错误依然存在

换一种方法安装

>pip install jupyterlab -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com [W 19:12:20.983 LabApp] JupyterLab server extension not enabled, manually loading... [I 19:12:21.079 LabApp] JupyterLab extension loaded from d:\anaconda3\lib\site-packages\jupyterlab [I 19:12:21.079 LabApp] JupyterLab application directory is d:\anaconda3\share\jupyter\lab [I 19:12:21.650 LabApp] Serving notebooks from local directory: d:\MYjupyterlab [I 19:12:21.651 LabApp] 0 active kernels [I 19:12:21.652 LabApp] The Jupyter Notebook is running at: http://localhost:8888/?token=6a13f1a6d560aadc2758ac38f0c5546ff41de3601e1c7e0c [I 19:12:21.655 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:12:21.660 LabApp]

也安装不了,网上的一些方法也试过,安装不了。

由于版本冲突等其他原因,很容易出现安装不成功,因为Python有着丰富的库,这是它之所以如此受欢迎的很关键原因,所以也存在说安装多种版本的情况,或者版本迭代遗留下来一些问题,这个如果按照它的提示操作没有成功的话,一般情况就比较难搞定了。

如果你也遇到的是上述难以解决的问题那么本人建议:最好新建一个虚拟环境,在里面进行安装,当然了,在已存在的干净的虚拟环境中也是没有问题的。

在虚拟环境中安装好了之后,输入jupyter lab回车即可,就会自动打开浏览器,如下:

另外,在安装的时候国内用户一般都建议使用镜像地址,比如清华的或豆瓣的等,而且我习惯将https修改为http,避免验证问题,毕竟这个我只是拿来快速下载使用,别无其他,来到用户目录,打开.condarc文件,使用下面这段替换上即可。

channels: - defaults show_channel_urls: true default_channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有